package cn.ulyer.app.modules;


import cn.ulyer.common.annotation.Sensitive;
import cn.ulyer.common.enums.SensitiveStrategy;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.util.Date;

@Data
public class TestModel {

    @Sensitive(sensitiveStrategy = SensitiveStrategy.CHINESE_NAME)
    private String name;
    private InnerModel test;
    private Long  id;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createTime;

    @Data
    public static class InnerModel{

        @Sensitive(sensitiveStrategy = SensitiveStrategy.ID_CARD)
        private String card;

        private String custom;

        @Sensitive(sensitiveStrategy = SensitiveStrategy.CHINESE_NAME)
        private String name;
    }

}
